#include <iostream>
#include "myAdd.hpp"
using namespace std;

class Point
{
    int m_x;
    int m_y;
public:
    Point(int x, int y) : m_x(x), m_y(y){}
    friend ostream& operator<<(ostream& os, const Point & str);
    Point operator+(const Point & str)
    {
        return Point(this->m_x + str.m_x, this->m_y + str.m_y);
    }
};

ostream& operator<<(std::ostream& os,const Point & str)
{
    os << str.m_x + str.m_y;
    return os;
}

int main()
{
    /* 汇编在连接之前，所以这个*/
    cout << add(10, 20) << endl;

    cout << add<float>(10.3, 20.2) << endl;

    Point p1(1, 1);
    Point p2(2, 2);
    return 0;
}